class @FriendsListingModel extends Backbone.Model
    defaults:
        Login:''
        Friends:[]
        Size:10
        Page:1
        Direction:0
        Column:"Email"
        Filter:
            Email:''
            Login:''
    url:->
        url = SiteMap.Friends.FriendsListing + "/"+@attributes.Login
        url = url + "?page="+@attributes.Page
        url = url + "&size=" + @attributes.Size
        return url
    parse:(response)->
        items={}
        items.Size = response.Size
        items.Page = response.Page
        items.Direction = response.Direction
        items.Filter = {}
        if response.Filter.Email?
            items.Filter.Email = response.Filter.Email
        if response.Filter.Login?
            items.Filter.Login = response.Login
        items.Friends = response.Friends
        return items